<template>
  <g-loading type="square" :spinning="loading">
    <div class="create-screen">
      <div class="top-bar">
        <div class="right-bar"></div>
        <div class="left-bar"></div>
        <router-link :to="{name:'MyCom', query:{param:indexEnc} }" class="return-btn"> 
          <span class="return-text">
            <n-icon class="return-icon">
              <IconBack />
            </n-icon>
            返回
          </span>
        </router-link>
      </div>
      <particles></particles>
      <div class="background-detail">
      <el-row>
        <el-col :span="4"><div class="grid-content img-wrap"><img  class="img-wrap-img" :src="data.skillImgUrl" /></div></el-col>
        <el-col :span="12"><div class="grid-content grid-styel">
           <div class="skill-card-title">     
              <span class="title-child">人物技能【MAX】</span> 
		      </div>
          <div class="skill-card-detail">
            <p>第一技能：{{ data.firstSkill }}</p>
            <p>第二技能：{{ data.secondSkill }}</p>
            <p>第三技能：{{ data.thirdSkill }}</p>
            <p>第四技能：{{ data.fourthSkill }}</p>
		      </div>
        </div></el-col>
        <el-col :span="4"><div class="grid-content grid-styel">
            <div class="start-card-title">     
              <span class="start-child">星盘【MAX】</span>
		        </div>
            <div class="start-card-detail">
              <p>攻击力：{{ data.astrolabeAttack }}</p>
              <p>生命值：{{ data.astrolabeBlood }}</p>
              <p>防御力：{{ data.astrolabeDefense }}</p>
              <p>星盘技能：{{ data.astrolabeSkills }}</p>
		       </div>
         </div></el-col>
        <el-col :span="16"><div class="grid-content grid-styel">
           <div class="soul-card-title">     
              <span class="soul-child"  v-if=" data.isSoul == 1 ">魂灵装【MAX】</span>
              <span  class="soul-child" v-else>魂灵装【暂未开启】</span>             
		        </div>
            <div class="soul-card-detail">
              <div class="soul-as-top">
                  <div class="soul-attack">攻击力：{{ data.soulAttack }}</div>
                  <div class="soul-blood">生命值：{{ data.soulBlood }}</div>
                  <!-- <div class="soul-blood">魂装材料{{ data.soulBlood }}</div> -->
                  <span v-if=" data.isSoul == 1 ">
                  <div class="hz-cl">
                    <n-button
                      type="primary"
                      :focusable="false"
                      :style="{
                        '--n-font-size': '100%',
                        '--n-height':'1.2vw',
                        'border-radius':'5px 5px 5px 5px',
                        'color':'black'
                      }"
                      @click="confirmCreate(null)"
                    >
                      <template #icon>
                      </template>
                      魂装材料
                    </n-button> 
                  </div></span>
                  
              </div>
              <p>魂灵装第一技能：{{ data.soulFirstSkill }}</p>
              <p>魂灵装第二技能：{{ data.soulSecondSkill }}</p>
              <p>魂灵装第三技能：{{ data.soulThirdSkill }}</p>
              <p>魂灵装第四技能：{{ data.soulFourthSkill }}</p>
              <p>魂灵装第五技能：{{ data.soulFifthSkill }}</p>
		       </div>
        </div></el-col>
         <el-col :span="4"><div class="grid-content grid-styel">
            <div class="appraise-card-title">     
              <span class="appraise-child">包子点评</span>
		        </div>
            <div class="appraise-card-detail">
              <p class="line-h" v-if=" data.appraise === '' ">包子正在忙碌点评中...</p>
              <p class="line-h" v-else>{{ data.appraise }}</p>   
                
              <p class="bottom-url"  v-if=" data.roleDrawCardUrl "><span>角色抽卡链接（友情防晒提示）↓ </span> <a style="color:#5599FF" :href=data.roleDrawCardUrl  target="_blank">{{data.roleDrawCardUrl}}</a></p>          
		       </div>
         </div></el-col>
      </el-row>
      </div>  
      
    </div>

  <n-modal
    v-model:show="visibleCreateDialog"
    preset="dialog"
    :show-icon="false"
    title="魂灵装材料"
    style="width: 770px;padding-bottom: 14px;"
  >
    <div class="create-dialog">
      <new-input 
          v-model="selSoul"
          class="name-input" 
          placeholder="请填写已有材料并以下文本填充回车，计算满破所缺魂装材料（例：命运井之水*4、白星粉尘*7）"
          @change="handleOption"
      />  
      <div v-show="selSoulVisible">
        <p class="name-title">魂满破MAX所还需材料：</p>
          <p class="bm-text">{{selSoulResult}}</p>
      </div>
      <p class="name-title">魂一破：</p>
        <p class="bm-text">{{data.soulFirstBm}}</p>
      <p class="name-title">魂二破：</p> 
        <p class="bm-text">{{data.soulSecondBm}}</p>
      <p class="name-title">魂三破：</p>
        <p class="bm-text">{{data.soulThirdBm}}</p>
      <p class="name-title">魂四破：</p>
        <p class="bm-text">{{data.soulFourthBm}}</p>
      <p class="name-title">魂五破：</p>
        <p class="bm-text">{{data.soulFifthBm}}</p> 
     
    </div>
  </n-modal>

  </g-loading>

</template>

<script lang='ts'>
import { defineComponent, ref, onMounted, nextTick, computed,reactive,toRefs } from 'vue'
import { useRouter,useRoute } from 'vue-router'
import { useMessage } from 'naive-ui'
import { ProjectGroup, ProjectTemplate } from '@/domains/project'
import { getProjects, createProject } from '@/api/project'
import { getSysTemplates } from '@/api/templates'
import { scrollToLeft } from '@/utils/animation'
import { IconArrowLeft, IconArrowRight, IconBack, IconPlus } from '@/icons'
import { getCljjRoleSkill,saveClPvUv } from '@/api/user'
import Particles from '@/components/particles/index.vue'
import { encrypt,decrypt } from '@/utils/util'

export default defineComponent({
  name: 'CreateScreen',
  components: {
    IconArrowLeft,
    IconArrowRight,
    IconBack,
    IconPlus,
    "particles":Particles
  },
  setup() {
    const nMessage = useMessage()
    const loading = ref(true)
    const templates = ref<ProjectTemplate[]>([])

    const visibleCreateDialog = ref(false)
    const visiblePreviewDialog = ref(true)
    const projectName = ref('')
    const currentPage = ref(0)
    const name = ref('')
    const attribute = ref('')
    const serverResourceType = ref('')
    const indexEnc =  ref<Partial<ProjectTemplate> | null>({})
    const template = ref<Partial<ProjectTemplate> | null>({})
    const groupId = ref(0)
    const groups = ref([new ProjectGroup(0, '未分组')])
    const saveLoading = ref(false)
    const router = useRouter()
    const routes = useRoute()

    const scrollRef = ref<any>(null)
    const groupOpts = computed(() => {
      return groups.value.map(m => ({ value: m.id, label: m.name }))
    })
    const selSoul = ref('')
    const selSoulResult = ref('')
    const selSoulVisible = ref(false)
   
    const state = reactive({
      data: {},
    })

    onMounted(async () => {
      let flag = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)
       // 移动端处理
       if(flag != null ){
          router.push({
            name: 'MyError'
          })
       }

      const res = await getSysTemplates()
      loading.value = false
      templates.value = res.data
       const enc = JSON.parse(decrypt(routes.query.param));
       const tplId = parseInt(enc.id as string)
      indexEnc.value = routes.query.param;

      getCljjRoleSkill(tplId).then(res=>{ 
        const data = res.data.data;  
        state.data = data;
      });
      savePvUv(tplId);

      // 魂材料筛选

    })

    // 记录pvuv
    const savePvUv = (tplId) => {
        // const url = "http://124.221.197.189:8088/index.html#/create-screen?id="+tplId;
        const url = "https://www.cljj.wiki/#/create-screen?id="+tplId;
        saveClPvUv(url).then();
    }

    const handleOption = () => {
      // 总魂装数据分组统计
      let soulTotal = state.data.soulFirstBm + "、" + state.data.soulSecondBm + "、" + state.data.soulThirdBm + "、" + state.data.soulFourthBm + "、" + state.data.soulFifthBm;
      let soulTotalArr  = soulTotal.split("、");
      const soulTotalMap = new Map();
      for (let i = 0; i<soulTotalArr.length;i++) {
        let sourTotalArr = soulTotalArr[i].split("*");
        let soulTemp = soulTotalMap.get(sourTotalArr[0]);
        if(soulTotalMap.get(sourTotalArr[0]) == undefined){
          soulTemp = 0 ;
        }
        soulTotalMap.set(sourTotalArr[0], parseFloat(soulTemp)+parseFloat(sourTotalArr[1]));
      }
      // 组装筛选的数据
      let selSoulArr  = selSoul.value.split("、");
      const selSoulMap = new Map();
      for (let i = 0; i<selSoulArr.length;i++) {
        let selArr = selSoulArr[i].split("*");
        selSoulMap.set(selArr[0], selArr[1]);
      }
      // 筛选已有数据
      var soulResult = "";
      // 筛选材料置于第一个
      for(let key of soulTotalMap.keys()){
        console.log(soulTotalMap.get(key));
        let soulTemp = soulTotalMap.get(key);
        if(selSoulMap.get(key) != undefined){
          let lostSoul = selSoulMap.get(key);
          soulTemp = parseFloat(soulTemp) - parseFloat(lostSoul);
          soulResult += ( key + "*" + soulTemp + " | ");
        }
      }
      // 引入算法计算公式
      for(let key of soulTotalMap.keys()){
        console.log(soulTotalMap.get(key));
        let soulTemp = soulTotalMap.get(key);
        if(selSoulMap.get(key) == undefined){
          soulResult += ( key + "*" + soulTemp + "、");
        }
      }
      soulResult = soulResult.substring(0,soulResult.length-1);
      selSoulResult.value = soulResult;
      console.log(soulResult);
      // 展示所需魂MAX材料w,搜索为空隐藏
      if(typeof selSoul.value === 'undefined' || selSoul.value == null || selSoul.value === ''){
        selSoulVisible.value = false;
      }else{
        selSoulVisible.value = true;
      }
    }

    const confirmCreate = (tpl: ProjectTemplate | null) => {
      template.value = tpl ?? {}
      visibleCreateDialog.value = true
    }

    const previewTemplate = (tpl: ProjectTemplate, idx: number) => {
      template.value = tpl
      visiblePreviewDialog.value = true

      nextTick(() => {
        togglePreviewTemplate(tpl, idx)
      })
    }

    const togglePreviewTemplate = (tpl: ProjectTemplate, idx: number) => {
      template.value = tpl
      scrollToLeft(149 * idx - 350, {
        getContainer: () => scrollRef.value,
      })
    }

    const prevPreviewTemplate = () => {
      const idx = templates.value.findIndex(m => m.id === template.value.id)
      if (idx > 0) {
        const nidx = idx - 1
        const tpl = templates.value[nidx]
        togglePreviewTemplate(tpl, nidx)
      }
    }

    const nextPreviewTemplate = () => {
      const idx = templates.value.findIndex(m => m.id === template.value.id)
      if (idx < templates.value.length - 1) {
        const nidx = idx + 1
        const tpl = templates.value[nidx]
        togglePreviewTemplate(tpl, nidx)
      }
    }

    const doCreate = async () => {
      try {
        if (!projectName.value) {
          nMessage.error('请输入大屏名称')
          return
        }
        saveLoading.value = true
        const templateId = template.value?.id
        const res = await createProject({
          name: projectName.value,
          groupId: groupId.value,
          templateId: templateId ?? 0,
        })
        if (res.data.code === 0) {
          visibleCreateDialog.value = false
          visiblePreviewDialog.value = false
          router.push({
            name: 'ScreenEditor',
            params: {
              projectId: res.data.data,
            },
            query: {
              tpl: templateId,
            },
          })
        } else {
          throw Error(res.data.message)
        }
      } catch (error) {
        nMessage.error(error.message)
      } finally {
        saveLoading.value = false
      }
    }
    return {
      loading,
      templates,
      visibleCreateDialog,
      visiblePreviewDialog,
      projectName,
      currentPage,
      name,
      attribute,
      serverResourceType,
      indexEnc,
      template,
      groupId,
      groups,
      groupOpts,
      saveLoading,
      scrollRef,
      selSoul,
      selSoulResult,
      selSoulVisible,
      confirmCreate,
      previewTemplate,
      togglePreviewTemplate,
      prevPreviewTemplate,
      nextPreviewTemplate,
      doCreate,
      handleOption,
      ...toRefs(state)

    }
  },
})
</script>

<style lang="scss" scoped>
@import "@/styles/mixins/function.scss";

@font-face {
  font-family: Orbitron-Bold;
  src: url('@/styles/fonts/orbitron-bold.ttf') format('truetype');
}

@mixin cover-img {
  content: '';
  display: block;
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  background-color: #131e2d;
  background-image: url(com-cdn('datav/datav-vue-logo.png'));
  background-repeat: no-repeat;
  background-position: center;
  background-size: 50%;
  filter: grayscale(1);
  opacity: 0.36;
}

.create-screen {
  height: 100%;
  display: flex;
  flex-direction: column;
  // background: rgb(0 51 125 / 7%);
  background: #101129;

  margin: 0;
  padding: 0;
   user-select: none;

  .top-bar {
    height: 50px;
    width: 100%;
    position: relative;
    z-index: 2;

    &::before {
      content: ' ';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 20px;
      width: 100%;
      background: #151b22;
    }

    .right-bar {
      position: absolute;
      left: 150px;
      top: 20px;
      height: 5px;
      width: 100%;
      border-top: var(--datav-border-primary);
      border-left: 2px solid var(--datav-main-color);
      background: rgb(55 126 255 / 4%);
      border-top-left-radius: 5px;
      transform: skewX(-45deg);
      box-shadow: 0 5px 28px 0 rgb(55 126 255 / 28%);
    }

    .left-bar {
      position: absolute;
      left: 0;
      top: 24px;
      height: 25px;
      width: 138px;
      border-right: 2px solid var(--datav-main-color);
      border-bottom: var(--datav-border-primary);
      transform: skewX(-45deg);
      border-bottom-right-radius: 5px;
      box-shadow: 0 5px 28px 0 rgb(55 126 255 / 28%);
    }

    .return-btn {
      position: absolute;
      left: -31px;
      top: 0;
      width: 180px;
      height: 48px;
      line-height: 48px;
      text-align: center;
      background: #151b22;
      cursor: pointer;
      transform: skewX(-45deg);
      border-bottom-right-radius: 5px;
      

      .return-text {
        display: inline-block;
        color: #fff;
        font-size: 14px;
        margin-left: 10px;
        transform: skewX(45deg);
        transition: 0.2s;

        &:hover {
          color: var(--datav-main-color);
        }
      }

      .return-icon {
        margin-right: 5px;
      }
    }
  }

  .creator-wp {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 30px;

    .template-list {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      overflow-x: hidden;
      overflow-y: scroll;
      color: #fff;
      font-size: 12px;
      margin: 0 -16px;
      padding-bottom: 100px;
      padding-top: 60px;

      .template-item {
        width: 258px;
        height: 184px;
        box-shadow: var(--datav-shadow);
        border: var(--datav-border);
        margin: 16px;
        transition: 0.2s;
        outline: 1px solid transparent;
        cursor: default;

        .template-image {
          width: 100%;
          height: 146px;
          display: flex;
          align-items: center;
          justify-content: center;
          transition: 0.2s;
          position: relative;
        }

        .template-info {
          display: flex;
          align-items: center;
          justify-content: space-between;
          padding: 10px;
          height: 36px;
          background: var(--datav-bgcolor-2);
          transition: 0.2s;
        }

        &.--blank {
          position: relative;
          outline: var(--datav-border-primary);

          .template-image {
            box-shadow: inset 0 0 46px 0 rgb(136 215 255 / 29%);
          }

          .template-info {
            border-top: var(--datav-border-primary);
            justify-content: center;
            font-size: 14px;
          }
        }
      }

      .preview-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        position: relative;

        &::after {
          @include cover-img;
        }
      }

      .template-mask {
        position: absolute;
        left: 0;
        top: 0;
        right: 0;
        bottom: 0;
        background: rgb(0 0 0 / 50%);
        transition: 0.2s;
        pointer-events: none;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        opacity: 0;
        font-weight: 400;

        .create-btn {
          width: 112px;
          padding: 0 5px;
        }

        .preview-btn {
          margin-top: 10px;
          width: 112px;
          padding: 0 5px;
          margin-left: 0;
        }
      }

      .template-item:hover {
        outline: var(--datav-border-primary);

        .template-mask {
          pointer-events: all;
          opacity: 1;
        }
      }

      .template-name {
        font-size: 12px;
      }

      .template-size {
        color: #999;
        text-align: right;
        font-family: Orbitron-Bold, PingFangSC-Medium, "PingFang SC", "Microsoft YaHei", Arial, Helvetica, sans-serif;
      }

      .template-item-placehoder {
        width: 258px;
        margin: 16px;
      }
    }
  }
}

.create-dialog {
  .required {
    display: inline-block;
    margin-right: 6px;
    color: var(--datav-red-color);
  }

  .template-desc {
    margin-bottom: 20px;
    opacity: 0.8;
    overflow: hidden;
    -webkit-line-clamp: 3;
    display: box;
    -webkit-box-orient: vertical;
  }

  .name-title {
    margin-bottom: 10px;
    line-height: 20px;
    font-style: italic;
  }

  .name-input {
    margin-bottom: 15px;
    height: 28px;
    line-height: 26px;
    flex-wrap: wrap
  }
}

@mixin slider-blur($placement: left, $angle: -90deg) {
  content: ' ';
  position: absolute;
  top: 0;
  #{$placement}: 0;
  background-image:
    linear-gradient(
      #{$angle},
      rgb(0 0 0 / 0%) 64%,
      #303640 100%
    );
  width: 82px;
  height: 96px;
  pointer-events: none;
  z-index: 1;
}

.preview-dialog {
  margin-top: -10px;
  margin-bottom: -40px;

  .preview-list {
    width: 895px;
    height: 150px;
    margin-left: -20px;
    background: #303640;
    display: flex;
    flex-direction: column;
    justify-content: center;

    .template-list-title {
      font-size: 12px;
      margin: 0 0 15px 30px;
    }
  }

  .blur-wp {
    position: relative;
    margin: 0 24px;

    &::before {
      @include slider-blur();
    }

    &::after {
      @include slider-blur(right, 90deg);
    }
  }

  .scroll-wp {
    white-space: nowrap;
    overflow-x: scroll;
    padding-bottom: 8px;

    &::-webkit-scrollbar-thumb {
      background: var(--datav-main-color);
      border-radius: 5px;
      border: none;
    }
  }

  .preview-wp {
    position: relative;
    font-size: 0;
    width: 137px;
    height: 97px;
    overflow: hidden;
    display: inline-block;
    margin: 0 6px;
    cursor: pointer;
    border: 1px solid rgb(123 123 123 / 25%);
    transition: 0.2s;

    .preview-small-img {
      display: block;
      width: 100%;
      height: 76px;
      object-fit: cover;
      position: relative;

      &::after {
        @include cover-img;
      }
    }

    .preview-screen-name {
      font-size: 12px;
      line-height: 19px;
      background: var(--datav-bgcolor-2);
      padding: 0 5px;
      font-weight: 300;
    }

    &:hover,
    &.selected {
      border-color: var(--datav-main-color);
    }
  }

  .preview-gif {
    height: 420px;
    display: flex;
    padding: 20px 10px 50px;

    .gif-wp {
      width: 610px;
      position: relative;

      .snapshot-gif {
        width: 100%;
        height: 100%;
        display: block;
        position: relative;
        border: var(--datav-border);
        box-shadow: var(--datav-shadow);

        &::after {
          @include cover-img();
        }
      }

      .next-icon,
      .prev-icon {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        padding: 5px;
        border-radius: 50%;
        height: 26px;
        width: 26px;
        margin: 10px;
        font-weight: 600;
        background: rgb(255 255 255 / 20%);
        color: rgb(255 255 255 / 80%);
        cursor: pointer;
        transition: 0.2s;

        &:hover {
          color: #fff;
          background: rgb(255 255 255 / 30%);
        }
      }

      .next-icon {
        right: 0;
      }
    }

    .preview-create {
      flex: 1;
      overflow: hidden;
      padding-left: 20px;
    }
  }
}

.preview-create-btn {
  margin-top: 30px;

  .next-icon {
    font-size: 12px;
  }
}
 .data {
    display: flex;
    margin-bottom: 50px;
  }
  .data .data-item {
    flex: 1;
    margin: 0 10px;
  }
  .el-table {
    border: 1px solid #EBEEF5;
    border-bottom: none;
  }
  .has-gutter th {
    border-right: 1px solid #EBEEF5;
  }

  .has-gutter th:last-child {
    border-right: none;
  }
 .data {
    display: flex;
    margin-bottom: 50px;
  }
  .data .data-item {
    flex: 1;
    margin: 0 10px;
  }
  .el-table {
    border: 1px solid #EBEEF5;
    border-bottom: none;
  }
  .has-gutter th {
    border-right: 1px solid #EBEEF5;
  }

  .has-gutter th:last-child {
    border-right: none;
  }
  .el-table__row td {
    border-right: 1px solid #EBEEF5;
  }
  .el-table__row td:last-child {
    border-right: none;
  }

  .img-wrap {
      height: 20vw;
      margin-left: 4vw;
      margin-top: 2vw;
      // outline: 1px solid #66f;
  //  box-shadow: 0px 0px 10px #ee0a24 inset, 0px 0px 0px 15px #fff inset, 0px 0px 10px 15px #07c160 inset;
  
     
    }
    .img-wrap img {
      height: 100%;
      //蓝色背景效果
      box-shadow: 0px 0px 10px #FFD700;
      background: linear-gradient(#FFD700,#FFD700) left top,
      linear-gradient(#FFD700,#FFD700) left bottom,
      linear-gradient(#FFD700,#FFD700) right top,
      linear-gradient(#FFD700,#FFD700) right bottom;
      background-size: 4px 4px;
      background-repeat: no-repeat;

      // 浅土色粗边框
      // border-radius:10px;
      // background: tan;
      // outline:10px solid #655;
      // box-shadow:0 0 0 5px #655;

    
    }
    .grid-styel{
      height: 20vw;
      color: white
     
    }

    .grid-styels{
      height: 20vw;
      color: 		#D00000
    }    
   .skill-card-title {
      height: 4vw;
      width: 45vw;
      // outline: 1px solid rgb(0, 0, 2);
      margin-left: 4vw;
      margin-top: 2vw;
       display: flex;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      // background-color: #101129;
      // color: rgb(238, 11, 11);

    }

    .title-child{
     font-weight:bold;
     font-size:1vw
    }
    
    .skill-card-detail {
      height: 16vw;
      width: 45vw;
      // outline: 1px solid rgb(0, 0, 2);
      margin-left: 4vw;
      font-size:1vw;
      padding: 2vw;
      // background-color: tan;
      // background-image: url('http://124.221.197.189:8088/DSJ.png');
      background-image: url('https://www.cljj.wiki/DSJ.png');
      background-size: 100% 100%;           
			background-repeat: no-repeat;
    }

    p{ line-height:20px} 

    .skill-card-detail p{ 
      margin:1vw auto;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
      line-height: 1.2vw;
      } 

    .skill-card-detail p:hover {
      overflow: visible;
      white-space: normal;
    }

// 星盘
   .start-card-title {
      height: 4vw;
      width: 27vw;
      // outline: 1px solid rgb(0, 0, 2);
      margin-left: 2vw;
      margin-top: 2vw;
       display: flex;
      align-items: center;
      justify-content: center;
      flex-direction: column;
    }
    .start-child{
     font-weight:bold;
     font-size:1vw
    }
    
    .start-card-detail {
      height: 16vw;
      width: 27vw;
      // outline: 1px solid rgb(0, 0, 2);
      margin-left: 2vw;
      font-size:1vw;
      padding: 2vw;
      //  background-image: url('http://124.221.197.189:8088/DSJ.png');
       background-image: url('https://www.cljj.wiki/DSJ.png');
      background-size: 100% 100%;           
			background-repeat: no-repeat;
    }
    

    .start-card-detail p{ margin:1vw auto} 

    .start-card-detail p{ 
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
      line-height: 1.2vw;
    } 
    .start-card-detail p:hover {
      overflow: visible;
      white-space: normal;
    }

    // 魂装
   .soul-card-title {
      height: 4vw;
      width: 61.5vw;
      // outline: 1px solid rgb(0, 0, 2);
      margin-left: 4vw;
      margin-top: 2vw;
       display: flex;
      align-items: center;
      justify-content: center;
      flex-direction: column;
    }
    .soul-child{
     font-weight:bold;
     font-size:1vw
    }
    
    .soul-card-detail {
      height: 16vw;
      width: 61.5vw;
      // outline: 1px solid rgb(0, 0, 2);
      margin-left: 4vw;
      font-size:1vw;
      padding: 2vw;
      line-height: 0vw;
      //  background-image: url('http://124.221.197.189:8088/DSJ.png');
       background-image: url('https://www.cljj.wiki/DSJ.png');
      background-size: 100% 100%;           
			background-repeat: no-repeat;
    }

    .soul-card-detail p{ margin:1vw auto} 

    .soul-card-detail p{ 
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
      line-height: 1.1vw;
    } 
    .soul-card-detail p:hover {
      overflow: visible;
      white-space: normal;
    }

    .soul-attack{ 
      display:inline;
      margin-left: 10vw;
      } 
    .soul-blood{ 
      display:inline;
      margin-left: 10vw;
    } 
     .hz-cl{ 
      // display:inline;
      // margin-left: 15vw;
      // position: relative;
      // left: 15vw;
      position: relative;
      left: 47vw;
    } 

    // 点评
    .appraise-card-title {
      height: 4vw;
      width: 27vw;
      // outline: 1px solid rgb(0, 0, 2);
      margin-left: 2vw;
      margin-top: 2vw;
       display: flex;
      align-items: center;
      justify-content: center;
      flex-direction: column;
    }
    .appraise-child{
     font-weight:bold;
     font-size:1vw
    }
    
    .appraise-card-detail {
      height: 16vw;
      width: 27vw;
      // outline: 1px solid rgb(0, 0, 2);
      margin-left: 2vw;
      font-size:1vw;
      line-height: 1.1vw;
      padding: 2vw;
      // background-image: url('http://124.221.197.189:8088/DSJ.png');
       background-image: url('https://www.cljj.wiki/DSJ.png');
      background-size: 100% 100%;           
			background-repeat: no-repeat;
    }
   .appraise-card-detail p{ margin:1vw auto} 


    .background-detail{
      z-index: 1;
      // // position: absolute;
      // width: 100%;
      // height: 100%;
      // background-size: cover;
      // background-position: center;
    //  opacity: 0.9;
    }
    .text-hh{
      white-space: pre-wrap;
      word-break: break-all;
      word-wrap: break-word;
    }

    .bm-text{
      color: #5599FF ;
      background: var(--datav-gui-component-bgcolor);
      line-height: 20px;
      padding: 2px 4px;
      font-size: 13px;
      margin-bottom: 1vw
    }

    .line-h{
      line-height: 1.1vw;
    }

    .soul-as-top{
      position: absolute;
      width: 100%;
      height: 1vw;
    }

    .bottom-url{
      position: absolute;
      bottom: 1.5vw;
    }
</style>
